<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: ColorMaps in OpenCV</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ColorMaps in OpenCV<div class="ingroups"><a class="el" href="../../d7/dbd/group__imgproc.html">Image Processing</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga9a805d8262bcbe273f16be9ea2055a65"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65">cv::ColormapTypes</a> { <br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a5d4a709cda1130bfa3cc4b4c5ae8f82a">cv::COLORMAP_AUTUMN</a> = 0, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a91d58e66f015ea030150bdc8545d3b41">cv::COLORMAP_BONE</a> = 1, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65ab3f207661ddf74511b002b1acda5ec09">cv::COLORMAP_JET</a> = 2, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a66b53e69b9d61792e57008962dbef670">cv::COLORMAP_WINTER</a> = 3, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65af7f0add024009b0e43f8c83f3ca0b923">cv::COLORMAP_RAINBOW</a> = 4, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a8c4210cb135b2555ba95e2db97f65ace">cv::COLORMAP_OCEAN</a> = 5, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a5e032add919a3c2c447182f0815d2a6f">cv::COLORMAP_SUMMER</a> = 6, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65afde88b0caed8acc01447906d700b99fb">cv::COLORMAP_SPRING</a> = 7, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a16c23a6bf984dc0f7a9704bd16fd6917">cv::COLORMAP_COOL</a> = 8, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a141ad9bfece7aa670ff3bddd38fac98e">cv::COLORMAP_HSV</a> = 9, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a84213aa42eaa8fcadacde9fc33a4d88b">cv::COLORMAP_PINK</a> = 10, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65aef83628a5b46e23bf823000ff0270304">cv::COLORMAP_HOT</a> = 11, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a48cbda63f52a232eea096a54f2a7572d">cv::COLORMAP_PARULA</a> = 12, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65ad4b00db72c380f9227c3f48b32121eb7">cv::COLORMAP_MAGMA</a> = 13, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65ab5e0464f3ac7083a8f030a45f24005fa">cv::COLORMAP_INFERNO</a> = 14, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a732a833f9939122143cfb7772cabd10d">cv::COLORMAP_PLASMA</a> = 15, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65afdb81862da35ea4912a75f0e8f274aeb">cv::COLORMAP_VIRIDIS</a> = 16, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a9742bb11678692f9ba22c7c0c0fa1abd">cv::COLORMAP_CIVIDIS</a> = 17, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a2785d360bb7875d9a7127b3a7304f688">cv::COLORMAP_TWILIGHT</a> = 18, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65ae0deafa5ab38bd25d34b620c1778e52c">cv::COLORMAP_TWILIGHT_SHIFTED</a> = 19, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a61e4747e35b5775ea2ca27ac1484ad94">cv::COLORMAP_TURBO</a> = 20, 
<br/>
  <a class="el" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65a8426eb1eeddc369deb7ca49a57ba87dd">cv::COLORMAP_DEEPGREEN</a> = 21
<br/>
 }<tr class="memdesc:ga9a805d8262bcbe273f16be9ea2055a65"><td class="mdescLeft"> </td><td class="mdescRight">GNU Octave/MATLAB equivalent colormaps.  <a href="../../d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga9a805d8262bcbe273f16be9ea2055a65"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadf478a5e5ff49d8aa24e726ea6f65d15"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d50/group__imgproc__colormap.html#gadf478a5e5ff49d8aa24e726ea6f65d15">cv::applyColorMap</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int colormap)</td></tr>
<tr class="memdesc:gadf478a5e5ff49d8aa24e726ea6f65d15"><td class="mdescLeft"> </td><td class="mdescRight">Applies a GNU Octave/MATLAB equivalent colormap on a given image.  <a href="../../d3/d50/group__imgproc__colormap.html#gadf478a5e5ff49d8aa24e726ea6f65d15">More...</a><br/></td></tr>
<tr class="separator:gadf478a5e5ff49d8aa24e726ea6f65d15"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacb22288ddccc55f9bd9e6d492b409cae"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d50/group__imgproc__colormap.html#gacb22288ddccc55f9bd9e6d492b409cae">cv::applyColorMap</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> userColor)</td></tr>
<tr class="memdesc:gacb22288ddccc55f9bd9e6d492b409cae"><td class="mdescLeft"> </td><td class="mdescRight">Applies a user colormap on a given image.  <a href="../../d3/d50/group__imgproc__colormap.html#gacb22288ddccc55f9bd9e6d492b409cae">More...</a><br/></td></tr>
<tr class="separator:gacb22288ddccc55f9bd9e6d492b409cae"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The human perception isn't built for observing fine changes in grayscale images. Human eyes are more sensitive to observing changes between colors, so you often need to recolor your grayscale images to get a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your computer vision application.</p>
<p>In OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample code reads the path to an image from command line, applies a Jet colormap on it and shows the result:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d9c/core_2include_2opencv2_2core_8hpp.html">opencv2/core.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d87/imgcodecs_8hpp.html">opencv2/imgcodecs.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d4/dd5/highgui_8hpp.html">opencv2/highgui.hpp</a>&gt;</span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d2/d75/namespacecv.html">cv</a>;</div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span> *argv[])</div><div class="line">{</div><div class="line">    <span class="comment">// We need an input image. (can be grayscale or color)</span></div><div class="line">    <span class="keywordflow">if</span> (argc &lt; 2)</div><div class="line">    {</div><div class="line">        cerr &lt;&lt; <span class="stringliteral">"We need an image to process here. Please run: colorMap [path_to_image]"</span> &lt;&lt; endl;</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> img_in = <a class="code" href="../../d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56">imread</a>(argv[1]);</div><div class="line">    <span class="keywordflow">if</span>(img_in.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4">empty</a>())</div><div class="line">    {</div><div class="line">        cerr &lt;&lt; <span class="stringliteral">"Sample image ("</span> &lt;&lt; argv[1] &lt;&lt; <span class="stringliteral">") is empty. Please adjust your path, so it points to a valid input image!"</span> &lt;&lt; endl;</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line">    <span class="comment">// Holds the colormap version of the image:</span></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> img_color;</div><div class="line">    <span class="comment">// Apply the colormap:</span></div><div class="line">    <a class="code" href="../../d3/d50/group__imgproc__colormap.html#gadf478a5e5ff49d8aa24e726ea6f65d15">applyColorMap</a>(img_in, img_color, <a class="code" href="../../d3/d50/group__imgproc__colormap.html#gga9a805d8262bcbe273f16be9ea2055a65ab3f207661ddf74511b002b1acda5ec09">COLORMAP_JET</a>);</div><div class="line">    <span class="comment">// Show the result:</span></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">"colorMap"</span>, img_color);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>(0);</div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65" title="GNU Octave/MATLAB equivalent colormaps. ">ColormapTypes</a> </dd></dl>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga9a805d8262bcbe273f16be9ea2055a65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9a805d8262bcbe273f16be9ea2055a65">◆ </a></span>ColormapTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65">cv::ColormapTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>GNU Octave/MATLAB equivalent colormaps. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a5d4a709cda1130bfa3cc4b4c5ae8f82a"></a>COLORMAP_AUTUMN <div class="python_language">Python: cv.COLORMAP_AUTUMN</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_autumn.jpg" src="../../colorscale_autumn.jpg"/>
<div class="caption">
autumn</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a91d58e66f015ea030150bdc8545d3b41"></a>COLORMAP_BONE <div class="python_language">Python: cv.COLORMAP_BONE</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_bone.jpg" src="../../colorscale_bone.jpg"/>
<div class="caption">
bone</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65ab3f207661ddf74511b002b1acda5ec09"></a>COLORMAP_JET <div class="python_language">Python: cv.COLORMAP_JET</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_jet.jpg" src="../../colorscale_jet.jpg"/>
<div class="caption">
jet</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a66b53e69b9d61792e57008962dbef670"></a>COLORMAP_WINTER <div class="python_language">Python: cv.COLORMAP_WINTER</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_winter.jpg" src="../../colorscale_winter.jpg"/>
<div class="caption">
winter</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65af7f0add024009b0e43f8c83f3ca0b923"></a>COLORMAP_RAINBOW <div class="python_language">Python: cv.COLORMAP_RAINBOW</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_rainbow.jpg" src="../../colorscale_rainbow.jpg"/>
<div class="caption">
rainbow</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a8c4210cb135b2555ba95e2db97f65ace"></a>COLORMAP_OCEAN <div class="python_language">Python: cv.COLORMAP_OCEAN</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_ocean.jpg" src="../../colorscale_ocean.jpg"/>
<div class="caption">
ocean</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a5e032add919a3c2c447182f0815d2a6f"></a>COLORMAP_SUMMER <div class="python_language">Python: cv.COLORMAP_SUMMER</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_summer.jpg" src="../../colorscale_summer.jpg"/>
<div class="caption">
summer</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65afde88b0caed8acc01447906d700b99fb"></a>COLORMAP_SPRING <div class="python_language">Python: cv.COLORMAP_SPRING</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_spring.jpg" src="../../colorscale_spring.jpg"/>
<div class="caption">
spring</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a16c23a6bf984dc0f7a9704bd16fd6917"></a>COLORMAP_COOL <div class="python_language">Python: cv.COLORMAP_COOL</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_cool.jpg" src="../../colorscale_cool.jpg"/>
<div class="caption">
cool</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a141ad9bfece7aa670ff3bddd38fac98e"></a>COLORMAP_HSV <div class="python_language">Python: cv.COLORMAP_HSV</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_hsv.jpg" src="../../colorscale_hsv.jpg"/>
<div class="caption">
HSV</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a84213aa42eaa8fcadacde9fc33a4d88b"></a>COLORMAP_PINK <div class="python_language">Python: cv.COLORMAP_PINK</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_pink.jpg" src="../../colorscale_pink.jpg"/>
<div class="caption">
pink</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65aef83628a5b46e23bf823000ff0270304"></a>COLORMAP_HOT <div class="python_language">Python: cv.COLORMAP_HOT</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_hot.jpg" src="../../colorscale_hot.jpg"/>
<div class="caption">
hot</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a48cbda63f52a232eea096a54f2a7572d"></a>COLORMAP_PARULA <div class="python_language">Python: cv.COLORMAP_PARULA</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_parula.jpg" src="../../colorscale_parula.jpg"/>
<div class="caption">
parula</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65ad4b00db72c380f9227c3f48b32121eb7"></a>COLORMAP_MAGMA <div class="python_language">Python: cv.COLORMAP_MAGMA</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_magma.jpg" src="../../colorscale_magma.jpg"/>
<div class="caption">
magma</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65ab5e0464f3ac7083a8f030a45f24005fa"></a>COLORMAP_INFERNO <div class="python_language">Python: cv.COLORMAP_INFERNO</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_inferno.jpg" src="../../colorscale_inferno.jpg"/>
<div class="caption">
inferno</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a732a833f9939122143cfb7772cabd10d"></a>COLORMAP_PLASMA <div class="python_language">Python: cv.COLORMAP_PLASMA</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_plasma.jpg" src="../../colorscale_plasma.jpg"/>
<div class="caption">
plasma</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65afdb81862da35ea4912a75f0e8f274aeb"></a>COLORMAP_VIRIDIS <div class="python_language">Python: cv.COLORMAP_VIRIDIS</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_viridis.jpg" src="../../colorscale_viridis.jpg"/>
<div class="caption">
viridis</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a9742bb11678692f9ba22c7c0c0fa1abd"></a>COLORMAP_CIVIDIS <div class="python_language">Python: cv.COLORMAP_CIVIDIS</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_cividis.jpg" src="../../colorscale_cividis.jpg"/>
<div class="caption">
cividis</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a2785d360bb7875d9a7127b3a7304f688"></a>COLORMAP_TWILIGHT <div class="python_language">Python: cv.COLORMAP_TWILIGHT</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_twilight.jpg" src="../../colorscale_twilight.jpg"/>
<div class="caption">
twilight</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65ae0deafa5ab38bd25d34b620c1778e52c"></a>COLORMAP_TWILIGHT_SHIFTED <div class="python_language">Python: cv.COLORMAP_TWILIGHT_SHIFTED</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_twilight_shifted.jpg" src="../../colorscale_twilight_shifted.jpg"/>
<div class="caption">
twilight shifted</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a61e4747e35b5775ea2ca27ac1484ad94"></a>COLORMAP_TURBO <div class="python_language">Python: cv.COLORMAP_TURBO</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_turbo.jpg" src="../../colorscale_turbo.jpg"/>
<div class="caption">
turbo</div></div>
</td></tr>
<tr><td class="fieldname"><a id="gga9a805d8262bcbe273f16be9ea2055a65a8426eb1eeddc369deb7ca49a57ba87dd"></a>COLORMAP_DEEPGREEN <div class="python_language">Python: cv.COLORMAP_DEEPGREEN</div></td><td class="fielddoc"><div class="image">
<img alt="colorscale_deepgreen.jpg" src="../../colorscale_deepgreen.jpg"/>
<div class="caption">
deepgreen</div></div>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gadf478a5e5ff49d8aa24e726ea6f65d15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf478a5e5ff49d8aa24e726ea6f65d15">◆ </a></span>applyColorMap() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::applyColorMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>colormap</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.applyColorMap(</td><td class="paramname">src, colormap[, dst]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.applyColorMap(</td><td class="paramname">src, userColor[, dst]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Applies a GNU Octave/MATLAB equivalent colormap on a given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. </td></tr>
    <tr><td class="paramname">dst</td><td>The result is the colormapped source image. Note: <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> is called on dst. </td></tr>
    <tr><td class="paramname">colormap</td><td>The colormap to apply, see <a class="el" href="../../d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65" title="GNU Octave/MATLAB equivalent colormaps. ">ColormapTypes</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d2/dcf/samples_2cpp_2falsecolor_8cpp-example.html#a5">samples/cpp/falsecolor.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gacb22288ddccc55f9bd9e6d492b409cae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb22288ddccc55f9bd9e6d492b409cae">◆ </a></span>applyColorMap() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::applyColorMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>userColor</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.applyColorMap(</td><td class="paramname">src, colormap[, dst]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.applyColorMap(</td><td class="paramname">src, userColor[, dst]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</code></p>
<p>Applies a user colormap on a given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The source image, grayscale or colored of type CV_8UC1 or CV_8UC3. </td></tr>
    <tr><td class="paramname">dst</td><td>The result is the colormapped source image. Note: <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> is called on dst. </td></tr>
    <tr><td class="paramname">userColor</td><td>The colormap to apply of type CV_8UC1 or CV_8UC3 and size 256 </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:40 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
